﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using PPI.General;
using PPI.WebConsumer.PPI.Svc;

namespace PPI.WebConsumer.Inspection
{
    public class WInspectionImages
    {
        public static Int32 Save(Int32 imageId, Int32 InspectionFk, Int32 InspectionResultFk, string filename)
        {
            ConfigReader reader = ConfigReader.GetInstance();
            PPI.Svc.Service1 svc = new Service1();
            return svc.InspectionImages_Save(imageId, InspectionFk, InspectionResultFk, filename, reader.ConectionMode);
        }

        public static void Delete (Int32 imageId, string fileName)
        {
            ConfigReader reader = ConfigReader.GetInstance();
            PPI.Svc.Service1 svc = new Service1();
            svc.InspectionImages_Delete(imageId, fileName, reader.ConectionMode);

        }

        public static DataSet GetInspectionImageById(Int32 inspectionId)
        {
            ConfigReader reader = ConfigReader.GetInstance();
            PPI.Svc.Service1 svc = new Service1();
            return svc.InspectionImages_GetByInspection(inspectionId, reader.ConectionMode);
        }
    }
}
